package com.example.timeskilltest.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.timeskilltest.model.Goods;
import com.example.timeskilltest.service.GoodsService;

@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @RequestMapping("/list")
    public List<Goods> list() {
        List<Goods> list = goodsService.list();
        return list;
    }
}
